package model.networkTopology;

import java.util.ArrayList;
import java.util.List;

import model.connectible.Connectible;

public class Node {
	private List<Node> links;
	private Connectible trueForm;
	private int id;

	public Node(int id) {
		this.id = id;
		links = new ArrayList<Node>();
	}
	
	public List<Node> getLinks() {
		return links;
	}

	public void setLinks(List<Node> links) {
		this.links = links;
	}
	
	public void addLink(Node node) {
		this.links.add(node);
	}

	public Connectible getTrueForm() {
		return trueForm;
	}

	public void setTrueForm(Connectible trueForm) {
		this.trueForm = trueForm;
	}
	
	public int getLinksSize() {
		return this.links.size();
	}
	
	public int getId() {
		return id;
	}
	
	public String toString() {
		String s = "";
		for (Node node : links) {
			s += "Link to: "+node.getId()+"\n";
		}
		return "Node "+id+"\n"+s+"\n";
	}
}
